#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

void reverse(char* str,int n)
{
	int j = 0;
	char* str1 = str;
	int k = 0;
	for (k = 0; k < n; k++)
	{
		str = str1;
		for (j = 0; j < 3; j++)
		{
			char term = 'w';
			term = *str;
			*str = *(str + 1);
			*(str + 1) = term;
			str++;

		}
	}
}

int main()
{
	char arr[] = "ABCD";
	int n = 0;
	int i = 0;
	size_t len = strlen(arr);
	scanf("%d", &n);
	reverse(arr,n);
	for (i = 0; i <= len - 1; i++)
	{
		printf("%c", arr[i]);
	}
	return 0;
}